package nl.haemers.data.utils 
{
	import nl.haemers.data.constants.DataTypes;
	/**
	 * ...
	 * @author Jonathan Haemers
	 */
	public class ObjectUtils 
	{
		
		public function ObjectUtils() 
		{
		}
		
		/** Public methods **/
		
		/** Getters & Setters **/
		
		/** Protected methods **/
		
		/** Private methods **/
		
		/** Static methods **/
		public static function isDataType(value:String) : Boolean
		{			
			return (value == DataTypes.BOOLEAN || value == DataTypes.INT || value == DataTypes.NUMBER || 
					value == DataTypes.STRING || value == DataTypes.UINT);
		}
		
		public static function isCollectionType(value:String) : Boolean
		{
			//TODO: Check the Vector Datatype
			return (value == DataTypes.ARRAY || value.indexOf("__AS3__.vec::Vector.") === 0);//value == DataTypes.VECTOR
		}
		
		public static function getDataType(value:String) : String
		{
			return (value.indexOf("__AS3__.vec::Vector.") === 0) ? DataTypes.VECTOR : value;
		}
		
	}

}